-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement remote feature flag controller #12427
base: main
Are you sure you want to change the base?
Conversation
allow remote feature flag controller symlink to get bundled by metro
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
5e9991d
to
6f8d208
Compare
74b9b88
to
9a67929
Compare
app/core/Engine/controllers/RemoteFeatureFlagController/utils.ts
Outdated
Show resolved
Hide resolved
This reverts commit 00a3bd1.
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
f17adc5
to
b003b6a
Compare
b003b6a
to
f20e31a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12427 +/- ##
==========================================
+ Coverage 56.41% 57.09% +0.67%
==========================================
Files 1797 1823 +26
Lines 40586 40902 +316
Branches 5097 5171 +74
==========================================
+ Hits 22896 23352 +456
+ Misses 16134 15965 -169
- Partials 1556 1585 +29 ☔ View full report in Codecov by Sentry. |
## **Description** Add unit tests to feature flags controller and useMinimumVersions unit tests updated ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
Bitrise✅✅✅ Commit hash: 9cd1bf0 Note
|
Quality Gate passedIssues Measures |
Description
Introduction of
@metamask/remote-feature-flag-controller
library.Remote feature flag controller manages data flow, retry policy, and cache expiry.
The controller consumer manages default values, data persistency, and data distribution.
See ADR for a in-depth description
Technical decisions
Controller init on
Engine.ts
with feature flags fetching only on cold app starts.@metamask/remote-feature-flag-controller
is only asked to fetch feature flags after its init inEngine.ts
. Ensures feature flags are only fetched on cold app starts.Fallback values
Default values are used when remote feature flags are undefined.
The fallback mechanism is implemented by each feature flag selector
app/selectors/featureFlagsController/<featureFlagName>
In this PR we include
minimumAppVersion
selector, which manages the LD feature flagmobile-minimum-versions
One selector per each feature flag
LD feature flags can be boolean, number, strings on JSON objects.
We've decided to have each feature flag with its own selector
A feature flag selector contains:
This architecture offers a clear separation between each feature flag and the logic behind it, allowing easier manipulation.
Code owners are assigned to each feature flag.
Related issues
Fixes: https://github.com/MetaMask/mobile-planning/issues/2054
Fixes: https://github.com/MetaMask/mobile-planning/issues/1975
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist